<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>交接数据列表</title>
    <link rel="stylesheet" href="__PUBLIC__/css/person.css">
    <link rel="stylesheet" href="__PUBLIC__/dpa/css/page.css">
    <script src="__PUBLIC__/dpa/js/jquery-2.1.4.js"></script>
    <style>
        button{
            margin-left:50px;
            margin-top:50px;
        }
        td{
            text-align:center;
        }
    </style>
</head>
<body>
<!--加载导航条开始-->
<div class="nav-bar">
    <ul>
        <li class="in"><a href="{:U('Home/Index/menu')}">自定义菜单</a></li>
        <li class="in"><a href="{:U('Home/Upload/upload')}">上传excel</a></li>
        <li class="in"><a href="{:U('Home/Index/unit')}">单位信息管理</a></li>
        <li class="in"><a href="{:U('Home/Index/personnel')}">人员信息管理</a></li>
        <li class="in"><a href="{:U('Home/Index/schedule')}">dpa数据管理</a></li>
        <li class="on"><a href="{:U('Home/Index/connect')}">交接数据管理</a></li>
        <li  style="background:darkcyan"> <a href="{:U('Home/Index/changepass')}">更改密码</a></li>
        <li style="background:grey"><a href="{:U('Home/Index/unlogin')}">退出登录</a></li>
    </ul>
</div>
<!--加载导航条结束-->
<form class="right-container" action="__ACTION__" method="get">
    <h1>交接数据列表<a href="__CONTROLLER__/connadd" class="add">添加</a></h1>
    <p>
        <span style="font-size:16px">条件查询:</span>
        <input type="text" name="dpasum" value="<?php echo I('get.dpasum'); ?>" placeholder="请输入dpa号" >
        <input type="text" name="givename" value="<?php echo I('get.givename'); ?>" placeholder="请输入发放人" >
        <input type="text" name="getname" value="<?php echo I('get.getname'); ?>"  placeholder="请输入接收人">
        <input style="width:50px" type="submit" value="查询">
    </p>
</form>
<div class="right-container">
    <table border="1">
       <tr>
           <th>序号</th>
           <th>dpa报告号</th>
           <th>委托单位</th>
           <th>发放人</th>
           <th>发放时间</th>
           <th>发放地点</th>
           <th>接收人</th>
           <th>接收时间</th>
           <th>接收地点</th>
           <th>接收电话</th>
           <th>操作</th>
       </tr>
       <foreach name="list" item="v" key="key">
       <tr>
           <td style="text-align:center">{$key+1+$firstRow}</td>
           <td style="text-align:center">{$v.dpasum}</td>
           <td style="text-align:center">{$v.requester}</td>
           <td style="text-align:center">{$v.givename}</td>
           <td style="text-align:center">{$v.givetime|date='Y-m-d',###}</td>
           <td style="text-align:center">{$v.givelocation}</td>
           <td style="text-align:center">{$v.getname}</td>
           <td style="text-align:center">{$v.gettime|date='Y-m-d',###}</td>
           <td style="text-align:center">{$v.getlocation}</td>
           <td style="text-align:center">{$v.tel}</td>
           <td>
               <a href="{:U('connedit',array('id'=>$v[id]))}">更改</a> |
               <a onclick="return confirm('确定要删除吗?');" href="{:U('conndel',array('id'=>$v[id]))}">删除</a>
           </td>
       </tr>
       </foreach>
    </table>
    <div class="green-black">{$page_str}</div>
</div>
</body>
<script>

    $('.del').click(function(){
        var requester = $(this).attr('requester');
        if(confirm("确定要删除这条数据吗?")) {
            location.href = '__CONTROLLER__/connectdel/requester/' + requester;
        }
    });
    $('#dw_like').click(function(){
        var dw = $('#dw').val();
        if($.trim(dw) != ''){
            location.href = '__CONTROLLER__/dw_like/dw/'+dw ;
        }else{
            alert('输入不能为空');
        }

    });
    //时间插件js
    $.timepicker.setDefaults($.timepicker.regional['zh-CN']);  // 设置使用中文
    $("#ft").datepicker();
    $("#tt").datepicker();
</script>
</html>